<?php 
header('Content-Type:text/html;charset=gbk');
require_once("db_manage.php");

$sort0 = $_POST['sort0'];
$sort1 = $_POST['sort1'];
$sort2 = $_POST['sort2'];
$sort3 = $_POST['sort3'];

$picname0 = $_POST['picname0'];
$picname1 = $_POST['picname1'];
$picname2 = $_POST['picname2'];
$picname3 = $_POST['picname3'];

$namelink0 = $_POST['namelink0'];
$namelink1 = $_POST['namelink1'];
$namelink2 = $_POST['namelink2'];
$namelink3 = $_POST['namelink3'];

$piclink0 = $_POST['piclink0'];
$piclink1 = $_POST['piclink1'];
$piclink2 = $_POST['piclink2'];
$piclink3 = $_POST['piclink3'];

$sort = array($sort0,$sort1,$sort2,$sort3);
$picname = array($picname0,$picname1,$picname2,$picname3);
$namelink = array($namelink0,$namelink1,$namelink2,$namelink3);
$piclink = array($piclink0,$piclink1,$piclink2,$piclink3);
/*
print_r($sort);
echo '<p>';
print_r($picname);
echo '<p>';
print_r($namelink);
echo '<p>';
print_r($piclink);
*/
//update albums
updateAlbums($sort, $picname, $namelink, $piclink);

//update sister link;
//updateSisterLink($linkname, $link);
echo "<script>location.href='manage_home_pic.php';</script>";
?>